<extend name="Base/ucenter_common"/>
<block name="body">
    <style>
        .form {
            margin-top: 30px;
        }

    </style>
    <div class="row">
        <h3>领队资料：</h3>
        <form class="form col-md-5 col-md-offset-3" action="{:U('user/top_profile')}" method="post"
              name="ey-change-form">
            <input type="hidden" name="p_id" value="{$_caption.p_id}">
            <div class="form-group">
                <label class="control-label">代表队名称</label>

                <input class="form-control" type="text" placeholder="请输入代表队名称" maxlength="10"
                       name="team_name" value="{$_caption.team_name}">
            </div>
            <div class="form-group">
                <label class="control-label">带队负责人</label>

                <input class="form-control" type="text" placeholder="请输入负责人" maxlength="8"
                       name="p_name" value="{$_user.p_name}">
            </div>
            <div class="form-group">
                <label class="control-label">带队负责人联系方式</label>

                <input class="form-control" type="text" placeholder="请输入负责人联系方式" maxlength="14"
                       name="p_phone" value="{$_caption.p_phone}">
            </div>
            <div class="form-group">
                <label class="control-label">带队负责人QQ</label>

                <input class="form-control" type="text" placeholder="请输入负责人QQ" maxlength="14"
                       name="p_qq" value="{$_caption.p_qq}">
            </div>
            <div class="form-group" style="margin-top: 20px;">
                <button type="submit" class="btn btn-success btn-block">提交保存</button>
            </div>
        </form>
    </div>
    <script>
        $(function () {
            $("form[name='ey-change-form']").bind('submit', function (e) {
                e.preventDefault();
                var _self = this;
                $.post($(this).attr('action'), $(this).serialize(), function (ret) {
                    layer.msg(ret.info);
                }, 'json');
            });
        })
    </script>
</block>